package com.kancy.demo.streamplus.channel.handler;

import com.kancy.demo.streamplus.channel.message.TextMessage;
import com.kancy.streamplus.channel.PollingMessageHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.messaging.Message;
import org.springframework.stereotype.Component;

/**
 * TestMessageHandler
 *
 * @author kancy
 * @date 2020/3/22 21:25
 */
@Slf4j
@Component
public class TestMessageHandler implements PollingMessageHandler<TextMessage> {

    /**
     * 处理消息
     *
     * @param message
     * @throws Exception
     */
    @Override
    public void handleMessage(Message<TextMessage> message) throws Exception {
        log.info("接收消息：{}", message);
    }
}
